home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
630
< prev
next >
Wrap
Text File
|
1996-08-06
|
2KB
|
41 lines
Newsgroups: comp.std.c
Path: nntp.coast.net!torn!sq!msb
From: msb@sq.com (Mark Brader)
Subject: Re: Restrictions on qsort compare function?
Message-ID: <1996Mar22.202615.9926@sq.com>
Organization: SoftQuad Inc., Toronto, Canada
References: <4iokop$h4p@lyra.csx.cam.ac.uk> <4iqjar$2m9@usenet.pa.dec.com> <1996Mar21.113301.2622@sq.com> <4it51b$ng8@usenet.pa.dec.com>
Date: Fri, 22 Mar 1996 20:26:15 GMT
# The function shall return an integer less than, equal to, or greater
# than zero if the first argument is considered to be respectively
# less than, equal to, or greater than the second.
> > In other words, it must yield an ordering of the possible data values.
> > This is only the case if
> > 1. It is a pure function...
> > 2. It is antisymmetric (I think that's the right word)...
> > 3. If is transitive...
>
> You have given an intuitively and logically reasonable definition of a
> comparison system, but the standard does not.
The standard does not have to define a "comparison system", because it
does not use that term in the cited passage. What this poster has called
"an intuitively and logically reasonable definition of a comparison system"
was intended as a statement of the obvious implications of the cited
passage. (Specifically, these implications follow from the use of the
expressions "considered to be ... less than, equal to, or greater than".)
> Until the standard finds a definition of a comparison system, it is
> defective.
Nonsense; the cited passage is perfectly clear.
--
Mark Brader "Yet again, I begged him to explain himself in plain
SoftQuad Inc. English. This request always surprises him, as he
msb@sq.com is always under the extraordinary impression that
Toronto he has done so." -- Lynn & Jay, "Yes Minister"
My text in this article is in the public domain.